# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=amsynth
pkgver=1.12.4
pkgrel=0
pkgdesc="easy-to-use software synth with a classic subtractive synthesizer topology"
url="https://amsynth.github.io"
arch="all"
license="GPL-2.0-only"
depends="libintl"
makedepends="alsa-lib-dev gettext-dev gtk+2.0-dev jack-dev lv2-dev"
subpackages="$pkgname-lang $pkgname-lv2"
source="https://github.com/amsynth/amsynth/releases/download/release-$pkgver/amsynth-$pkgver.tar.gz"

build() {
	LDFLAGS="-lintl $LDFLAGS"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

lv2() {
	pkgdesc="amsynth (LV2 plugins)"
	amove usr/lib/lv2/*
}

sha512sums="
502fdd1d6c4e54a57482d266977d78008efa26717c173be0bf98e907a111366fd80b65d667b9448e751085901dc5f2a61ac0bf5b1d02e35c695ecd99c9d1df00  amsynth-1.12.4.tar.gz
"
